package com.project.bean;

/**
 * 汽车实体类
 */
public class CarBean {
    /**汽车编号*/
    private int id;
    /**品牌*/
    private String type;
    /**价格*/
    private int price;
    /**所属公民*/
    private ManBean man;

    public CarBean(String type, int price, int manId) {
        this.type = type;
        this.price = price;
        this.man = new ManBean();
        this.man.setId(manId);
    }

    public CarBean(String type, int price) {
        this.type = type;
        this.price = price;
    }

    public CarBean() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public ManBean getMan() {
        return man;
    }

    public void setMan(ManBean man) {
        this.man = man;
    }

    @Override
    public String toString() {
        return "CarBean{" +
                "id=" + id +
                ", type='" + type + '\'' +
                ", price=" + price +
                ", man=" + man +
                '}'+"\n";
    }
}
